package com.itheima.reggie;

import com.itheima.reggie.domain.Employee;

/**
 * ThreadLocal操作工具类
 */
public class EmployeeHolder {


    private static ThreadLocal<Employee> threadLocal = new ThreadLocal<>();

    //放入数据
    public static void set(Employee employee) {
        threadLocal.set(employee);
    }


    //获取数据
    public static Employee get() {
       return threadLocal.get();
    }


    //移除数据
    public static void remove() {
        threadLocal.remove();

    }
}
